package com.myinterview.intest;

public class AlphaStringProcessor extends StringProcessor {

    public AlphaStringProcessor(String rawString) {
        super(rawString);
        this.inString = rawString.toLowerCase();
        System.out.println("AlphaStringProcessor input raw string: " + this.inString);
    }

    public String charProcessor(String inString, int currentIndex) {
        if (inString == ""){
            return inString;
        }
        StringBuilder builderString = new StringBuilder(inString);
        for (int i=processLength; i >0; i--) {
            builderString.deleteCharAt(currentIndex);
            //System.out.println("new string: " + builderString);
        }
        return builderString.toString();
    }
}